package com.xauto.pioneer.appuser.adapter;

import android.app.Activity;
import android.view.View;
import android.widget.TextView;

import com.xauto.pioneer.appuser.R;
import com.xauto.pioneer.appuser.model.GuideCategoryInfo;
import com.xauto.pioneer.appuser.model.GuideInfo;

/**
 * Created by Lemon on 2015/12/11.
 * Desc:订单列表 适配器
 */
public class GuideCategoryAdapter extends AbsAdapter<GuideCategoryInfo> {

    public GuideCategoryAdapter(Activity context, int layout) {
        super(context, layout);
    }

    @Override
    public ViewHolder<GuideCategoryInfo> getHolder() {
        return new TemplateViewHolder();
    }


    private class TemplateViewHolder implements ViewHolder<GuideCategoryInfo> {

        private TextView tvGuideInfo;

        @Override
        public void initViews(View v, int position) {
            tvGuideInfo = (TextView) v.findViewById(R.id.tvGuideInfo);
        }

        @Override
        public void updateData(GuideCategoryInfo guideInfo, int position) {
            tvGuideInfo.setText(guideInfo.guide_category_name);
        }

        @Override
        public void doOthers(GuideCategoryInfo guideInfo, int position) {

        }
    }
}
